package admin

import (
	database "hft/Database"
)

type FileUploadAndDownload struct {
	database.Base
	Name       string `json:"name" gorm:"comment:文件名称;type:varchar(255);size:255"`
	Url        string `json:"url,omitempty" gorm:"comment:文件地址;type:text"`
	ObjectName string `json:"objectName" gorm:"type:text"`
	Link       string `json:"link,omitempty" gorm:"comment:文件存在oss里的名字"`
	Type       string `json:"type,omitempty" gorm:"comment:文件的类型"`
	Size       int    `json:"size" gorm:"comment:文件大小"`
	Tag        string `json:"tag,omitempty" gorm:"column:tag;comment:文件标签"`
	Cover      string `json:"cover" gorm:"comment:封面;type:text"`
	CoverOss   string `json:"coverOss,omitempty" gorm:"comment:封面;type:text"`
	GroupId    int    `json:"groupId,omitempty"`
}

func (FileUploadAndDownload) TableName() string {
	return database.TableNameFormat("file_upload_and_download")
}
